<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="test"></div>
    <script src="./js/react.development.js"></script>
    <script src="./js/react-dom.development.js"></script>
    <script src="./js/babel.min.js"></script>
    <script type="text/babel">
        function Demo() {
            return <h1>hello react</h1>
        }
        ReactDOM.render(
            <Demo />, document.getElementById('test'))

            // 执行ReactDOM.render( <Demo />)之后发生了什么
            // 1.React解析组件标签，找到了 Demo 组件。
            // 2.发现组件是用函数定义的，随后调用该函数，将返回的虚拟DOM转为真实DOM，随后呈现在页面中
    </script>
</body>

</html>